using System;
using System.ComponentModel;
using Camalon.Drawing;
using System.Drawing;

namespace Camalon.Drawing.Design
{
	/// <summary>
	/// Summary description for PathGradientFillDesigner.
	/// </summary>
	public class PathGradientFillDesigner:ShapeFillDesigner
	{
		public PathGradientFillDesigner()
		{
			//
			// TODO: Add constructor logic here
			//
		}

		protected PropertyDescriptorCollection FillProperties = TypeDescriptor.GetProperties(typeof(PathGradientFill));
        
        public override void InitializeNewComponent(System.Collections.IDictionary defaultValues)
        {
            PathGradientFill fill = this.Component as PathGradientFill;

            if (fill != null)
            {
                CompoundColor[] colors = new CompoundColor[] 
				{
						new CompoundColor(Color.Black),
						new CompoundColor(Color.WhiteSmoke, 0.5f),
						new CompoundColor(SystemColors.InactiveCaption, 1f)
				};

                PropertyDescriptor prop = FillProperties["InterpolationColors"];

                if (prop != null) prop.SetValue(fill, colors);
            }

            base.InitializeNewComponent(defaultValues);
        }


	}
}
